class WallerModel {
  String studentNo;
  int milesTotal;
  int milesPeriod;
  List<MilesBreakdown> milesBreakdown;

  WallerModel(
      {this.studentNo, this.milesTotal, this.milesPeriod, this.milesBreakdown});

  WallerModel.fromJson(Map<String, dynamic> json) {
    studentNo = json['student_no'];
    milesTotal = json['miles_total'];
    milesPeriod = json['miles_period'];
    if (json['miles_breakdown'] != null) {
      milesBreakdown = new List<MilesBreakdown>();
      json['miles_breakdown'].forEach((v) {
        milesBreakdown.add(new MilesBreakdown.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['student_no'] = this.studentNo;
    data['miles_total'] = this.milesTotal;
    data['miles_period'] = this.milesPeriod;
    if (this.milesBreakdown != null) {
      data['miles_breakdown'] =
          this.milesBreakdown.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class MilesBreakdown {
  String studentName;
  String applyDate;
  String courseCode;
  String courseCodeDisp;
  String currency;
  String moneyDetail;
  String status;
  String value;
  String type;
  String expiryDate;

  MilesBreakdown(
      {this.studentName,
        this.applyDate,
        this.courseCode,
        this.courseCodeDisp,
        this.currency,
        this.moneyDetail,
        this.status,
        this.value,
        this.type,
        this.expiryDate});

  MilesBreakdown.fromJson(Map<String, dynamic> json) {
    studentName = json['student_name'];
    applyDate = json['apply_date'];
    courseCode = json['course_code'];
    courseCodeDisp = json['course_code_disp'];
    currency = json['currency'];
    moneyDetail = json['moneyDetail'];
    status = json['status'];
    value = json['value'];
    type = json['type'];
    expiryDate = json['expiry_date'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['student_name'] = this.studentName;
    data['apply_date'] = this.applyDate;
    data['course_code'] = this.courseCode;
    data['course_code_disp'] = this.courseCodeDisp;
    data['currency'] = this.currency;
    data['moneyDetail'] = this.moneyDetail;
    data['status'] = this.status;
    data['value'] = this.value;
    data['type'] = this.type;
    data['expiry_date'] = this.expiryDate;
    return data;
  }
}
